using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Generate Threshold Rings</para>
    /// <para>Creates a feature class of ring trade areas that expand around point features until the threshold value is reached.</para>
    /// <para>创建环贸易区域的要素类，该要素类围绕点要素展开，直到达到阈值。</para>
    /// </summary>    
    [DisplayName("Generate Threshold Rings")]
    public class GenerateThresholdRingTradeArea : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateThresholdRingTradeArea()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The input point feature layer.</para>
        /// <para>输入点要素图层。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature class.</para>
        /// <para>输出要素类。</para>
        /// </param>
        /// <param name="_threshold_variable">
        /// <para>Threshold Variable</para>
        /// <para>The selected Business Analyst dataset variable to which the threshold value will be applied.</para>
        /// <para>将应用阈值的所选 Business Analyst 数据集变量。</para>
        /// </param>
        public GenerateThresholdRingTradeArea(object _in_features, object _out_feature_class, object _threshold_variable)
        {
            this._in_features = _in_features;
            this._out_feature_class = _out_feature_class;
            this._threshold_variable = _threshold_variable;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Threshold Rings";

        public override string CallName => "ba.GenerateThresholdRingTradeArea";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_in_features, _out_feature_class, _threshold_variable, _threshold_values, _units, _id_field, _input_method.GetGPValue(), _expression];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The input point feature layer.</para>
        /// <para>输入点要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature class.</para>
        /// <para>输出要素类。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Threshold Variable</para>
        /// <para>The selected Business Analyst dataset variable to which the threshold value will be applied.</para>
        /// <para>将应用阈值的所选 Business Analyst 数据集变量。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Threshold Variable")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _threshold_variable { get; set; }


        /// <summary>
        /// <para>Threshold Values</para>
        /// <para>The size of the output rings. The rings will expand until they contain the threshold value of the selected variable.</para>
        /// <para>输出环的大小。环将展开，直到它们包含所选变量的阈值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Threshold Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _threshold_values { get; set; } = null;


        /// <summary>
        /// <para>Distance Units</para>
        /// <para>The distance units to be used with the threshold values.</para>
        /// <para>要与阈值一起使用的距离单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _units { get; set; } = null;


        /// <summary>
        /// <para>ID Field</para>
        /// <para>An ID that uniquely identifies each input point and is included in the output as an attribute.</para>
        /// <para>唯一标识每个输入点并作为属性包含在输出中的 ID。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("ID Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _id_field { get; set; } = null;


        /// <summary>
        /// <para>Input Method</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of value that is to be used for each drive time.</para>
        ///   <bulletList>
        ///     <bullet_item>Values—Uses a constant value (all trade areas will be the same size). This is the default.</bullet_item><para/>
        ///     <bullet_item>Expression—The values from a field or an expression (trade areas can be a different size).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要用于每个行驶时间的值的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>值 - 使用常量值（所有贸易区域的大小相同）。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>表达式 - 字段或表达式中的值（贸易区域可以是不同的大小）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _input_method_value _input_method { get; set; } = _input_method_value._VALUES;

        public enum _input_method_value
        {
            /// <summary>
            /// <para>Values</para>
            /// <para>Values—Uses a constant value (all trade areas will be the same size). This is the default.</para>
            /// <para>值 - 使用常量值（所有贸易区域的大小相同）。这是默认设置。</para>
            /// </summary>
            [Description("Values")]
            [GPEnumValue("VALUES")]
            _VALUES,

            /// <summary>
            /// <para>Expression</para>
            /// <para>Expression—The values from a field or an expression (trade areas can be a different size).</para>
            /// <para>表达式 - 字段或表达式中的值（贸易区域可以是不同的大小）。</para>
            /// </summary>
            [Description("Expression")]
            [GPEnumValue("EXPRESSION")]
            _EXPRESSION,

        }

        /// <summary>
        /// <para>Expression</para>
        /// <para>A fields-based expression to calculate the radii.</para>
        /// <para>用于计算半径的基于字段的表达式。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Expression")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _expression { get; set; } = null;


        public GenerateThresholdRingTradeArea SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}